import React, { Component } from 'react';
import {
  Platform,
  StyleSheet,
  Text,
  View,
  StatusBar,
  
} from 'react-native';

//个人面板
import PersonalPanel from './components/personalPanel'
//状态
import Status from './components/status'
//申请
import Apply from './components/apply'

export default class MyTravel extends Component{
	constructor(props){
		super(props)
		this.state = {
			show:true,
		}
	}
	showHide(res){				
		this.setState({show:res})
	}
	
	render(){
		let personalPanel = null; //通过if条件语句来进行渲染
		let status = null; //通过if条件语句来进行渲染
		if(this.state.show){
			personalPanel = <PersonalPanel/>
			status = <Status/>
		}
		
		return (
			<View style={styles.container}>
				<StatusBar backgroundColor="#45237a" />				
				{personalPanel}
				{status}
				<Apply showHide={this.showHide.bind(this)}/>
			</View>
		)
	}
}
const styles = StyleSheet.create({
	container: {
		flex: 1,		
	},
	

});